/*
 * @Author: heinan
 * @Date: 2021-07-14 17:24:49
 * @Last Modified by: heinan
 * @Last Modified time: 2021-07-14 18:03:47
 */
import { UPDATE_TITLE } from "@/store/types/home";

const defaultState = {
  title: "默认标题",
  list: [],
};
const home = function (state = defaultState, { type, payload }) {
  switch (type) {
    case "updateList":
      return {
        ...state,
        list: payload,
      };
    case UPDATE_TITLE:
      return {
        ...state,
        title: payload,
      };
    default:
      return state;
  }
};
export default home;
